// 部门管理
import request from '@/router/axios'

//展示表格 平级接口
export function departObj(query) {
    return request({
        url: '/admin/dept/PermissionTree',
        method: 'get',
        params: query
    })
}

//查询树 树状接口
export function departList(query) {
    return request({
        url: '/admin/dept/tree',
        method: 'get',
        params: query
    })
}

//年级展示表格
export function gradeObj(query) {
    return request({
        url: '/campus/sysdept/detpTree/1/2,3',
        method: 'get',
        params: query
    })
}

//搜索
export function SearchObj(query) {
    return request({
        url: '/admin/dept/findDeptByName',
        method: 'get',
        params: query
    })
}

//删除
export function delObj(id) {
    return request({
        url: '/campus/sysdept/'+ id,
        method: 'delete'
    })
}


//添加
export function addObj(obj) {
    return request({
        url: '/campus/sysdept',
        method: 'post',
        data: obj
    })
}

//根据ID查询
export function reviseObj(id) {
    return request({
        url: '/campus/sysdept/'+ id,
        method: 'get',
    })
}
//修改
export function editObj(obj) {
    return request({
        url: '/campus/sysdept',
        method: 'put',
        data: obj
    })
}



